Skip to content

fix(update): start automatic installs after fresh version checks - #403

Merged
liruifengv merged 1 commit into
mainfrom
liruifeng/fix-auto-update-first-check
Jun 4, 2026
Merged

fix(update): start automatic installs after fresh version checks#403
liruifengv merged 1 commit into
mainfrom
liruifeng/fix-auto-update-first-check

Conversation

@liruifengv

Copy link
Copy Markdown
Collaborator

Related Issue

No linked issue; this fixes startup automatic updates delaying installation until the next launch.

Problem

Automatic updates reused the notification-oriented cache flow: when the cache was empty, startup refreshed the latest-version cache in the background, but the freshly discovered version was not considered for installation until the next CLI launch.

What changed

  • Start the detached automatic installer from the fresh startup update check when it discovers a newer version.
  • Reuse the existing active-install, failure-threshold, preference, lock, telemetry, and logging paths for both cached and fresh update checks.
  • Add regression coverage for first-check installation, disabled automatic updates, and non-interactive startup.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

Validation

  • pnpm exec vitest run apps/kimi-code/test/cli/update/preflight.test.ts
  • pnpm --filter @moonshot-ai/kimi-code run typecheck
  • pnpm exec oxlint --type-aware apps/kimi-code/src/cli/update/preflight.ts apps/kimi-code/test/cli/update/preflight.test.ts
  • git diff --check

@changeset-bot

changeset-bot Bot commented Jun 4, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 1f9e555

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@moonshot-ai/kimi-code Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Jun 4, 2026

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@1f9e555
npx https://pkg.pr.new/@moonshot-ai/kimi-code@1f9e555

commit: 1f9e555

@liruifengv
liruifengv merged commit d645d7e into main Jun 4, 2026
9 checks passed
@liruifengv
liruifengv deleted the liruifeng/fix-auto-update-first-check branch June 4, 2026 04:29
@github-actions github-actions Bot mentioned this pull request Jun 4, 2026
sunjie21 pushed a commit to sunjie21/kimi-code that referenced this pull request Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant